

def check_number(str):
    for i in str:
        j=ord(i)
        if (j <46 or j>57) and j!=47 or (j==46 and i==str[0]) or (j==46 and i==str[len(str)-1]) :
            return False
    else:
        return True
